<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="head(title)"><!--head是这段名称（自己命名）,title是传递的参数-->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.css">
    <link rel="stylesheet" href="../../static/lib/editormd/css/editormd.min.css" th:href="@{/lib/editormd/css/editormd.min.css}">
    <link rel="stylesheet" href="../static/css/mycss.css" th:href="@{/css/mycss.css}">
    <link rel="shortcut icon" href="https://pandao.github.io/editor.md/favicon.ico" type="image/x-icon" />
    <title th:replace="${title}">博客详情</title><!--//replace可以用传递过来的参数替换掉title元素里面的东西，实现每个页面的title一致-->
</head>
<body>

<!--后端导航-->
<nav th:fragment="menu(n)" class="ui inverted attached segment my-padding-small my-shadow-small"><!--attached会连接上一个模块，没有缝隙-->
    <div class="iu container">
        <div class="ui inverted secondary stackable menu"> <!--menu导航条;   stackable会让导航栏以堆积的方式适应屏幕-->
            <h2 class="ui teal header item">管理后台</h2>  <!--item让这部分成为导航栏的条目-->
            <a href="" th:href="@{/admin/blogs}" class="my-item item my-mobile-hide" th:classappend="${n==1} ? 'active'"><i class="home icon"></i>博客</a>
            <a href="" th:href="@{/admin/types}" class="my-item item my-mobile-hide" th:classappend="${n==2} ? 'active'"><i class="idea icon"></i>分类</a>
            <a href="" th:href="@{/admin/tags}" class="my-item item my-mobile-hide" th:classappend="${n==3} ? 'active'"><i class="tags icon"></i>标签</a>
            <div class="right my-mobile-hide menu">
                <div class="ui dropdown item"><!--dropdown效果是鼠标放在item时会让该部分更显眼；-->
                    <div class="text">
                        <img class="ui avatar image" src="../../static/image/山城.jpg" th:src="@{/image/山城.jpg}">
                        <span th:text="${session.user.nickname}">承太郎</span>
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <a href="#" th:href="@{/admin/logout}" class="item">注销</a>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <div href="" class="ui my-menu toggle black icon button my-right-top my-mobile-show">
        <i class="sidebar icon"></i><!--三条横杠图标-->
    </div>
</nav>

<!--底部-->
<footer th:fragment="footer" class="ui inverted vertical segment my-padding-large">
    <div class="ui container diy_dp">
        <div class="ui stackable center aligned inverted divided grid">
            <div class="three wide column">
                <img src="../static/image/微信.jpg" th:src="@{/image/微信.jpg}" class="ui rounded image centered aligned" alt="" style="width: 130px">
            </div>

            <div class="three wide column">
                <h4 class="ui inverted header">最新博客</h4>
                <div id="newblog-container">
                    <div class="ui inverted link list" th:fragment="newblogList">
                        <a href="" class="my-teal item" target="_blank" th:href="@{/blog/{id}(id=${blog.id})}" th:each="blog : ${newblogs}" th:text="${blog.title}">碧蓝航线攻略</a><br>
                    </div>
                </div>
            </div>

            <div class="three wide column">
                <h4 class="ui inverted header">联系我</h4>
                <div class="ui inverted link list">
                    <a href="" class="my-teal item">Email：2332322340@qq.com</a><br>
                    <a href="" class="my-teal item">qq：2332322340</a><br>

                </div>
            </div>

            <div class="seven wide column">
                <h4 class="ui inverted header">最新博客</h4>
                <p class="my-text-spaced my-text-thin my-opacity-mini">终有奔走红尘时，莫忘曾经是书生</p>
            </div>

        </div>
        <div class="ui inverted section divider"></div>
        <p class="my-text-spaced my-text-thin my-opacity-tiny">Copyright @ 2021-2022 MrWuu Designed by MrWuu</p>
    </div>

</footer>

<th:block th:fragment="script"><!--th:block只是为了把所有js包裹起来，改成div也是可以的-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.js"></script>
<script src="../../static/lib/editormd/editormd.min.js" th:src="@{/lib/editormd/editormd.min.js}"></script>
</th:block>
</body>

